package pzl.kt.study

import android.os.Bundle
import android.view.View
import android.widget.TextView
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import pzl.kt.study.utils.获取笔信息
import pzl.kt.study.utils.设置字体颜色

class Test1Activity : AppCompatActivity() {

    var tv1: TextView? = null
    var tv2: TextView? = null

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_test1)

        tv1 = findViewById(R.id.tv1)
        tv2 = findViewById(R.id.tv2)
    }


    open fun click(v: View) {
        when (v.id) {
            R.id.tv1 -> Toast.makeText(this, " " + tv1!!.获取笔信息(), Toast.LENGTH_LONG).show()
            R.id.tv2 -> tv2!!.设置字体颜色("#D81B60")
        }
    }


}
